home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20020314-20021006
/
000023_entfred@hotmail.com_Fri Apr 5 17:07:33 EST 2002.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
2KB
|
56 lines
Article: 13294 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!news-out.visi.com!hermes.visi.com!hub1.meganetnews.com!hub1.nntpserver.com!cox.net!sn-xit-02!supernews.com!postnews1.google.com!not-for-mail
From: entfred@hotmail.com (Entfred)
Newsgroups: comp.protocols.kermit.misc
Subject: How to get return code from external Unix box running simple shell script?
Date: 5 Apr 2002 13:29:53 -0800
Organization: http://groups.google.com/
Lines: 38
Message-ID: <d6e12cad.0204051329.574003a2@posting.google.com>
NNTP-Posting-Host: 140.147.127.146
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1018042194 24786 127.0.0.1 (5 Apr 2002 21:29:54 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 5 Apr 2002 21:29:54 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13294
I saw an old post that Frank da Cruz said about using IF SUCCESS or
IF FAILURE to test the success or failure reported by an external command.
What I want to do is something a little different:
1. Kermit script (on a Windows 2000 PC) telnets to an external Sun
Unix box. The Kermit script is in a file called test.ksc:
set term type at386
set network tcp/ip
set host test.machine.com
output \13
input 5 login:
output testuser\13
input 5 password:
output testpassword\13
input 5 $
output testscript\13
connect
if fail (I am not sure what do do right here to get Unix return code)
Exit
End ;
2. On the Unix box, a simple script is run:
(call the script, testscript)
echo This is a test
date
exit 9
3. I would like the result code of 9 to be sent back to the kermit
script residing on the Windows 2000 PC.
How would this be done? Any tips to doing this would be
appreciated!
-- Entfred